import request from '@/utils/request'
export function getCarouselList(type) {
  return request({
    url: '/api/back/banner/list',
    method: 'get',
    params: { type }
  })
}
export function deleteCarouselItem(id) {
  return request({
    url: '/api/back/banner/delete',
    method: 'post',
    data: { id }
  })
}
export function addCarouselItem({ type, link, sort, image, id }) {
  return request({
    url: '/api/back/banner/create',
    method: 'post',
    data: { type, link, sort, image, id }
  })
}
export function editCarouselItem({ id, sort, link, image, type }) {
  return request({
    url: '/api/back/banner/update',
    method: 'post',
    data: { id, sort, link, image, type }
  })
}
